// TOWN DIALOGUE SCRIPT
//    Town 11: Isolated Hut

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

int i,j,k,r1,choice;
short lead_char;


begintalknode 1;
	state = -1;
	personality = 20;
	nextstate = 1;
	condition = 1;
	question = "Verona";
	text1 = "Verona, the Nephil shaman and owner of this hut, sits quietly with a cup of tea. She appears to be writing down some kind of recipe. You look at it, and she says, _It's for strawberry corncake. Very tasty!_";
	text2 = "_Come sit down dears, and drink some tea with me! It's very refreshing._ At her insistance, you sit down and join her. She is correct, it is very good. Finally, a pleasant response in this troubled forest!";

begintalknode 2;
	state = 1;
	personality = 20;
	nextstate = -1;
	condition = 1;
	question = "What are you doing out here all alone?";
	text1 = "She chuckles. _It's a long time since I left my tribe. You see, dears, I was arranged to be married to a son of a respectable family. Well, let's just say he was a hairy reptile!_ She laughs at her own humor.";
 text2 = "_I abandoned my tribe to get out of it. Probably a good thing too, they didn't look too highly on alchemy, a field that fascinates me as you may have guessed._ There is a long pause as she reflects.";
 text3 = "_Come to think of it, I don't even know where my old tribe is anymore. They were quite nomadic and they are probably on the other side of the island. Oh well, not like I'm ever going back anyway!_ she laughs.";

begintalknode 3;
	state = 1;
	personality = 20;
	nextstate = 2;
	condition = 1;
	question = "You sure have a lot of plants around here.";
	text1 = "_I see you've noticed,_ she replies with a smile. _I've always been fascinated with my green friends. They have so many delightful properties. I do a lot of mixing and matching, a lot of experimenting._";
 text2 = "_From my experimentation and the lessons I've learned from other travelers, I've acquired quite a knowledge of alchemy. I can make lots of things from healing potions to a glaze for wild turkeys._";
 text3 = "She rocks back in her chair. _I should mention that I do periodic trading of herbs and recipes for various goods. Often industrious travelers like you want to know that._";

begintalknode 4;
	state = 2;
	personality = 20;
	nextstate = -1;
	condition = 1;
	question = "I could really use some alchemical recipes.";
 text1 = "You finish shopping.";
 code = 
  begin_shop_mode("Verona", "Verona is a recluse shaman who has spent years mastering the art of alchemy. She often trades herbs and recipes with travelers.", 9, 2, -1);
 break;

begintalknode 5;
	state = 2;
	personality = 20;
	nextstate = -1;
	condition = 1;
	question = "I need some herbs to make potions.";
 text1 = "You finish shopping.";
 code = 
  begin_shop_mode("Verona", "Verona is a recluse shaman who has spent years mastering the art of alchemy. She often trades herbs and recipes with travelers.", 10, 2, 2);
 break;

begintalknode 6;
	state = 2;
	personality = 20;
	nextstate = -1;
	condition = 1;
	question = "Do you have any potions that you can spare?";
 text1 = "She shakes her head. _No, dears, sorry. I only make what I need when I need to. Saves on storing all those bottles. I can teach you to make your own though!_";

begintalknode 7;
	state = 1;
	personality = 20;
	nextstate = 3;
	condition = 1;
	question = "The tea is excellent!";
	text1 = "She smiles. _You flatter me, strangers,_ she says with a chuckle. _I developed the recipe myself over the years. I do all sorts of research, modifying things, trying out new things._";
 text2 = "_Ocassionally, I meet a travele,r and he shares a new secret with me, and I play around with that. I'm just surprised I haven't burned down my hut yet!_";

begintalknode 8;
	state = 3;
	personality = 20;
	nextstate = -1;
	condition = 1;
	question = "What sort of things have you developed?";
	text1 = "_Nothing too extraordinary. Lots of recipes for cooking, I must say. I make some of the best pear bread with honey glaze around. I'm sure not things that would interest you._";
 text2 = "_I have my lab in back if you want to poke around. Just watch out, I've captured a living fungus specimen from a swamp. It can be quite dangerous, so keep your distance from that._";

begintalknode 9;
	state = 3;
	personality = 20;
	nextstate = 4;
	condition = 1;
	question = "Do you do any research beside alchemy?";
	text1 = "She thinks. _Not particularly, although I've done a few things. While I was exploring for new herbs, I found this strange magic crystal. It was a box. I opened it up and inside was an ancient parchment._";
 text2 = "_I don't have it here right now, it's probably on my shelves somewhere._ She clears her throat. _Anyway dears, it had instructions for how to make a ring that can act as a weapon. It shoots flames!_";
 text3 = "_The band was a strange thing. It's actually synthesized from a lot of common herbs and minerals in the forest. It took several tries, but I managed to make it._ She pulls out a small gray metal band.";
 text4 = "_Its property is that it slowly charges objects with magical energy._ She holds out the band and shows you an opening. _I made the slot too, it can amplify inherent properties in objects such as gems._";
 text5 = "_The last part I need is a ruby. Now, I don't need weapons, I have no use for them. If you could find me a ruby, I would give you the ring._";
 text6 ="_I'm proud of my creation. I hope it is serving you well._";
 code =
  clear_strings();
  add_string(1);
  add_string(2);
  add_string(3);
  add_string(4);
  if (get_sdf(4,11) == 0) {
   set_flag(4,11,1);
   toggle_quest(5,1);
  }
  if (get_sdf(4,11) == 1)
   add_string(5);
  if (get_sdf(4,11) == 2)
   add_string(6);
 break;

begintalknode 10;
	state = 4;
	personality = 20;
	nextstate = -1;
	condition = ((has_item_of_class(1,0)) && (get_sdf(4,11) == 1));
	question = "I have the ruby you wanted. (give it to her)";
 text1 = "You give her the ruby. She smiles and goes to work. Verona rises and goes to her shelves and pulls out a very old parchment. She reads it over and takes everything to her lab.";
 text2 = "You follow her and she goes over to her cauldron. _I need to make something that will bind the ruby to the ring. I have the ingredients, I just need to make them up. Wait here._";
 text3 = "She goes around her hut, grabbing leaves, flowers, roots, and other sorts of things. She returns and mixes it together into a very thick, boiling, sappy goo. She takes a spoon and pours it on the metal band.";
 text4 = "She carefully takes the ruby and places it in the opening. Verona fliches back as a bright flash and a loud clasp as the ruby binds to the band. It cools and she cleans it. Then she hands it to you.";
 text5 = "_It's yours. It will shoot a bolt of fire once per day. Good luck in your travels_";
 code =
  has_item_of_class(1,1);
  set_flag(4,11,2);
  reward_give(450);
  award_party_xp(200,5);
  toggle_quest(5,0);
 break;

begintalknode 11;
	state = 4;
	personality = 20;
	nextstate = -1;
	condition = 1;
	question = "What do you know about these crystal boxes?";
 text1 = "_Not much. Nobody knows where they came from, but they turn up once in a while. The people of my tribe said that long ago the gods had a war and these were their tools. Perhaps it is true, but I cannot know._";
 text2 = "_I don't think anybody does for sure._";

begintalknode 12;
	state = 1;
	personality = 20;
	nextstate = -1;
	condition = ((has_item_of_class(1,0)) && (get_sdf(4,11) == 1));
	question = "I have the ruby you wanted. (give it to her)";
 text1 = "You give her the ruby. She smiles and goes to work. Verona rises and goes to her shelves and pulls out a very old parchment. She reads it over and takes everything to her lab.";
 text2 = "You follow her and she goes over to her cauldron. _I need to make something that will bind the ruby to the ring. I have the ingredients, I just need to make them up. Wait here._";
 text3 = "She goes around her hut, grabbing leaves, flowers, roots, and other sorts of things. She returns and mixes it together into a very thick, boiling, sappy goo. She takes a spoon and pours it on the metal band.";
 text4 = "She carefully takes the ruby and places it in the opening. Verona fliches back as a bright flash and a loud clasp as the ruby binds to the band. It cools and she cleans it. Then she hands it to you.";
 text5 = "_It's yours. It will shoot a bolt of fire once per day. Good luck in your travels_";
 code =
  has_item_of_class(1,1);
  set_flag(4,11,2);
  reward_give(450);
  award_party_xp(200,5);
  toggle_quest(5,0);
 break;

begintalknode 13;
	state = -1;
	personality = 21;
	nextstate = 5;
	condition = 1;
	question = "Grann";
	text1 = "A wolf quietly patrols the house, keeping any predators away. You approach him, he bows his head and politiely introduces himself. _I'm Grann. I keep things safe for mistress Verona._";
 text2 = "This generally wild animal has been very well domesticated.";

begintalknode 14;
	state = 5;
	personality = 21;
	nextstate = -1;
	condition = 1;
	question = "Tell me about Verona.";
	text1 = "_She's my master. I was a lonely wolf out in the wild when she found me. I was heavily wounded by a giant lizard, and my pack had left me for dead. Verona found me, healed me, and gave me intelligence._";
 text2 = "_Verona is a wonderful master and knows a lot about magic. She spends most of her time in the study or in the lab. I am sure she will be happy to see you and willing to help._";

begintalknode 15;
	state = 5;
	personality = 21;
	nextstate = -1;
	condition = 1;
	question = "What do you do here?";
	text1 = "_I keep the pests away, like giant rats, spiders, lizards, hungry bears, etcetera. Verona enhanced my strength so I can fight them off. She's very talented and kind._";
 text2 = "_I look after her plants and crops and make sure rabbits and other pests aren't getting to them. It's an honor to serve such a wonderful master._";

begintalknode 16;
	state = 5;
	personality = 21;
	nextstate = -1;
	condition = 1;
	question = "Wolves are carnivores. What do you eat with all these plants?";
	text1 = "_The forest has no shortage of things to satisfy my hunger. I usually feed on the pests that try to harm master Verona's crops. Oh, I never go hungry._";